<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
</body>

<script>
    // 方式1.回顾防抖原理
    let timer = null
    if (this.timer) {
      clearTimeout(this.timer)
    }
    this.timer = setTimeout(() => {
       console.log("防抖的原理")
    }, 500)
</script>
</html>